async function defineComponentProps() {
  let compId;
  try {
    compId = VueElement.id;
  } catch (e) {
    compId = "map";
  }
  TempSources.compId = compId;
  const componentProps = {
    interval: 2000,
  };
  componentProps.mapInfo = {
    dataType: 1,
    mapName: "广州市",
    url: "",
    mapCode: "440100",
  };
  option = {
    backgroundColor: "",
    tooltip: {
      show: true,
    },
    geo: [
      {
        show: false,
        map: compId,
      },
    ],
    series: [
      {
        type: "effectScatter",
        coordinateSystem: "geo",
        z: 5,
        data: [],
        symbolSize: 14,
        label: {
          normal: {
            show: true,
            formatter: function (params) {
              return (
                "{fline|地点：" +
                params.data.city +
                "}\n{tline|" +
                (params.data.info || "发生xx集件") +
                "}"
              );
            },
            position: "top",
            backgroundColor: "rgba(254,174,33,.8)",
            padding: [0, 0],
            borderRadius: 3,
            lineHeight: 32,
            color: "#f7fafb",
            rich: {
              fline: {
                padding: [0, 10, 10, 10],
                color: "#ffffff",
              },
              tline: {
                padding: [10, 10, 0, 10],
                color: "#ffffff",
              },
            },
          },
          emphasis: {
            show: true,
          },
        },
        itemStyle: {
          color: "#feae21",
        },
      },
      {
        type: "effectScatter",
        coordinateSystem: "geo",
        z: 5,
        data: [],
        symbolSize: 14,
        label: {
          normal: {
            show: true,
            formatter: function (params) {
              return (
                "{fline|地点：" +
                params.data.city +
                "}\n{tline|" +
                (params.data.info || "发生xx集件") +
                "}"
              );
            },
            position: "top",
            backgroundColor: "rgba(233,63,66,.9)",
            padding: [0, 0],
            borderRadius: 3,
            lineHeight: 32,
            color: "#ffffff",
            rich: {
              fline: {
                padding: [0, 10, 10, 10],
                color: "#ffffff",
              },
              tline: {
                padding: [10, 10, 0, 10],
                color: "#ffffff",
              },
            },
          },
          emphasis: {
            show: true,
          },
        },
        itemStyle: {
          color: "#e93f42",
        },
      },
      {
        type: "effectScatter",
        coordinateSystem: "geo",
        z: 5,
        data: [],
        symbolSize: 14,
        label: {
          normal: {
            show: true,
            formatter: function (params) {
              return (
                "{fline|地点：" +
                params.data.city +
                "}\n{tline|" +
                (params.data.info || "发生xx集件") +
                "}"
              );
            },
            position: "top",
            backgroundColor: "rgba(8,186,236,.9)",
            padding: [0, 0],
            borderRadius: 3,
            lineHeight: 32,
            color: "rgba(255,255,255,1)",
            rich: {
              fline: {
                padding: [0, 10, 10, 10],
                color: "#ffffff",
              },
              tline: {
                padding: [10, 10, 0, 10],
                color: "#ffffff",
              },
            },
          },
          emphasis: {
            show: true,
          },
        },
        itemStyle: {
          color: "#08baec",
        },
      },
      //地图
      {
        tooltip: {
          show: true,
        },
        name: "名称",
        type: "map",
        mapType: compId,
        roam: false,
        zoom: 1,
        label: {
          show: true,
          color: "rgba(255,255,255,1)",
          fontSize: 12,
          fontFamily: "Microsoft YaHei",
          emphasis: {
            color: "#000",
            fontSize: 16,
            fontFamily: "Courier New",
          },
        },
        itemStyle: {
          normal: {
            areaColor: "#003669",
            borderColor: "#3fdaff",
            borderWidth: 2,
            shadowColor: "rgba(63, 218, 255,0.6)",
            shadowBlur: 35,
          },
          emphasis: {
            areaColor: "#FA8C16",
            borderWidth: 0,
          },
        },
      },
    ],
  };

  componentProps.options = option;

  // 返回组件属性
  return componentProps;
}

// 组件创建前
async function defineComponentBeforeCreated() {}

// 组件创建后
async function defineComponentCreated({ VueInstance, VueElement }) {}

// 组件销毁
async function defineComponentDestroy() {}

async function handleDataCallback({ ResourceData, VueInstance }) {}
